1. Technical Field
The present invention relates in general to object-oriented computer systems. More specifically, the present invention relates to the field of object persistence in object-oriented systems.
2. Background Art
The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. The widespread proliferation of computers prompted the development of computer networks that allow computers to communicate with each other. With the introduction of the personal computer (PC), computing became accessible to large numbers of people. Networks for personal computers were developed that allow individual users to communicate with each other.
Computer systems typically include operating system software that controls the basic function of the computer, and one or more software applications that run under the control of the operating system to perform desired tasks. For example, a typical IBM Personal Computer may run the OS/2 operating system, and under the control of the OS/2 operating system, a user may execute an application program, such as a word processor. As the capabilities of computer systems have increased, the software applications designed for high performance computer systems have become extremely powerful.
Object-oriented programming based on an object model is a new way of creating computer programs that has become very popular over the past several years. The goal of using object-oriented programming is to create small, reusable sections of program code known as objects that can be quickly and easily combined and re-used to create new programs. By creating and re-using a group of well-tested objects, a more stable, uniform, and consistent approach to developing new computer programs can be achieved.
One particular object-oriented programming language is Java which is specifically designed to create distributed object systems. Java offers many features and advantages that makes it a desirable programming language to use. First, Java is specifically designed to create small programs, commonly called applets, that can reside on the network in centralized servers, and delivered to the client machine only when needed. Second, Java is an interpreted language. A Java program can be written once and ran on any type of platform that contains a Java Virtual Machine (JVM). Thus, Java is completely platform independent. And third, Java is an object-oriented language, meaning that software written in Java can take advantage of the benefits of object-oriented programming.
One issue in object oriented programming, and Java programing in particular, is object persistence. Persistent objects, as opposed to transient objects, have a lifetime that transcends the lifetime of the program that created them. To make an object persistent, mechanisms must be put in place to allow a persistent object to survive beyond the lifetime of the process from which the object was created so that other processes can access the object. This typically involves the storing of the objects onto permanent storage devices, such as hard disks, optical disks, tape drives, etc.
One common approach to providing persistence is the use of a persistent mixin class of objects. In this approach all objects for which persistence is desired must have this persistent mixin class as a superclass somewhere in their class""s inheritance lattice. Because a mixin class is required in the inheritance lattice, this method for providing object persistence cannot be used to provide persistence in a way that is orthogonal (i.e., independent) to the class of the object. Because the object persistence is not orthogonal to its class, the applications in which it can be used are limited.
Another approach which provides object persistence is xe2x80x9cexternalizationxe2x80x9d. externalization is the means or protocol used in object-oriented programming for transferring data out of an object. In essence the xe2x80x9cstate dataxe2x80x9d that defines the attributes of an object are xe2x80x9cexternalizedxe2x80x9d, or written out of the object into a local data store in a format compatible with the local data store. When the object is needed again, the externalized state data is internalized into an object, creating an exact copy of the object as it previously existed. Unfortunately, the process of externalizing the state data for storage and then internalizing it again when needed takes an excessive amount of processing time and thus slows performance in a way that can be unacceptable in many applications.
As the use of the object oriented programming increases, the need for a persistent object mechanism that overcomes the disadvantages of prior methods becomes more apparent. Without a mechanism that can be used to efficiently provide persistent objects in a Java and other interpreted programming environments, the computer industry will never fully realize the potential of the these programming environments.
A preferred embodiment of the present invention provides an improved system and method for object persistence. The preferred embodiment facilitates the creation of persistent objects in a way that is orthogonal to class and does not require the use of persistent mixin classes. The preferred embodiment uses reference objects, which to the view of the system act as the object itself, and storage objects which persistently store the data for the persistent objets. The reference objects include pointers to the storage object, and provide address translation and indirection when accesses are to be made to the persistent object data stored in the storage object.
The foregoing and other features and advantages of the present invention will be apparent from the following more particular description of the preferred embodiment of the invention, as illustrated in the accompanying drawings.